package org.gwtEss.other;

import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.Widget;


public class SimpleTextPanel extends Widget{
	Element el = DOM.createSpan();
	

	public SimpleTextPanel(String text) {
		super();
		el.setInnerText(text);
		setElement(el);
	}
	
	public SimpleTextPanel(String str, boolean isHtml) {
		super();
		if (isHtml)
			el.setInnerHTML(str);
		else 
			el.setInnerText(str);
		setElement(el);
	}

	public SimpleTextPanel() {
		super();
		setElement(el);
	}

	public void setHTML(String html){
		el.setInnerHTML(html);
	}
	public void setText(String text){
		el.setInnerText(text);
	}
	public String getHTML(){
		return el.getInnerHTML();
	}
	public String getText(){
		return el.getInnerText();
	}
}